final InputStream in = new FileInputStream("source.txt");
// effectively final variable can also be used here instead of a final one.
OutputStream out = new FileOutputStream("target.txt");

try (in; out) { // using pre-initialized resources
   ...
} catch(IOException e){
   logger.log(e.getMessage());
}